﻿<Window x:Class="Hisaab.Client.Desktop.View.Login"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:h="clr-namespace:Hisaab.Client.Common.Helpers;assembly=Hisaab.Client.Common"
        Style="{StaticResource LoginWindow}" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="436*" />
            <ColumnDefinition Width="92*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="48*" />
            <RowDefinition Height="95" />
            <RowDefinition Height="28" />
            <RowDefinition Height="28" />
            <RowDefinition Height="137*" />
            <RowDefinition Height="25" />
        </Grid.RowDefinitions>
        <Label Content="{Binding AppName}" Style="{StaticResource LoginAppName}" Grid.Row="1" />
        <Label Grid.Row="2" Content="{Binding VersionString}" Style="{StaticResource LoginVersion}"  />
        <Label Grid.Row="3" Content="{Binding Message}" Grid.ColumnSpan="2" />
        <Label Grid.Row="5" Content="{Binding Copyright}" Style="{StaticResource LoginCopyRights}" Grid.ColumnSpan="2" />
        <Canvas Grid.Row="4" Grid.ColumnSpan="2">
            <Label Target="{Binding ElementName=Username}" Content="_Username" Canvas.Top="50" Canvas.Left="47" />
            <TextBox Text="{Binding User.Username, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  h:FocusBehavior.IsFocused="True"
                 Height="26" Canvas.Left="119" Margin="0" Canvas.Top="50" Width="210" />
            <Label Target="{Binding ElementName=Password}" Content="_Password" Canvas.Top="80" Canvas.Left="47" />
            <PasswordBox h:PasswordHelper.Password="{Binding User.Password, Mode=TwoWay}" Height="26" Canvas.Left="119" Canvas.Top="80" Width="210" />
            <Button Command="{Binding LoginCommand}" CommandParameter="{Binding User}" Margin="0" Width="102" Content="Login" Height="27" Canvas.Left="119" Canvas.Top="115"  IsDefault="True" />
            <Button Command="{Binding CancelCommand}" CommandParameter="{Binding User}" Margin="0" Content="Cancel" Height="27" Canvas.Left="227" Canvas.Top="115" Width="102" IsCancel="True" />
        </Canvas>
    </Grid>
</Window>